package week3;
import java.util.*;

public class Day1 {


    public static void main2(String[] args) {
        char ch = 'a';
        int[] count = new int[27];
        count[(int)ch-97]++;
        for(int i=0;i<27;i++) {
            System.out.print(count[i]+" ");
        }
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            //可以重排的情况，某个字符的数量不能超过字符种类数
            int[] count = new int[27];
            char[] ret = new char[26];
            Set<Character> set = new HashSet<>();
            int k=0;
            int n = in.nextInt();
            String s = in.next();
            for(int i=0;i<n;i++) {
                char ch = s.charAt(i);
                if(!set.contains(ch)) {
                    set.add(ch);
                    ret[k++] = ch;
                }
                count[(int)ch-97]++;
            }
            int size = set.size();
            int max = 0;//记录某个字符的个数
            int index = 0;
            for(int i=0;i<27;i++) {
                if(count[i]>max) {
                    max = count[i];
                    index = i;
                }
            }

            if(max > size) {
                System.out.println("no");
            }else {
                System.out.println("yes");
                char[] tmp = new char[n];
                char ch = (char)(index+97);
                tmp[0]=ch;
                count[index]--;
                int j=0;
                for(int i=1;i<n;i++) {
                    char chh = tmp[i-1];
                    if(j==size) j=0;

                    for(;j<size;j++) {//遍历ret
                        char cc = ret[j];
                       if(cc != chh && count[(int)cc-97]!=0) {
                           tmp[i]=cc;
                           count[(int)cc-97]--;
                           j++;
                           break;
                       }
                       if(j==size-1) j=0;
                    }
                }
                for(int i=0;i<n;i++) {
                    System.out.print(tmp[i]);
                }
            }
        }
    }

}
